#include "comm.hpp"

int main(){
    int fd = open(FILEPATH, O_WRONLY);
    if(fd < 0){
        perror("open");
        exit(3);
    }
    while(1){
        string buf;
        getline(cin, buf);
        write(fd, buf.c_str(), buf.size());
    }
    close(fd);
    return 0;
}